<template>
	<view class="repair-wrap">

		<view>
			<view style="margin-top: 10px;">
				<view class="repair-box u-p-20 u-p-l-30 u-p-r-30">

					<view class=" u-m-t-24">
						<h3 style="margin-left: 10px;">财务退款信息</h3>
					</view>
					<view style="margin: 0 64rpx 0 64rpx;">
						<view style="display: flex;margin-top: 15px;">
							<view style="color: #999">收取押金</view>
							<text style="font-weight: 700;color: #F9A832;margin-left: 10px;">
								{{userObj.renovate_deposit}}
							</text>元
						</view>


						<view style="display: flex;margin-top: 15px;" v-if="userObj.renovate_penal_sum != null">
							<view style="color: #999">违约金扣除</view>
							<text style="font-weight: 700;color: #F9A832;margin-left: 10px;">
								{{userObj.renovate_penal_sum}}
							</text>元
						</view>
						<view style="display: flex;margin-top: 15px;" v-if="userObj.renovate_manage != null">
							<view style="color: #999">装修管理费扣除</view>
							<text style="font-weight: 700;color: #F9A832;margin-left: 10px;">
								{{userObj.renovate_manage}}</text>元
						</view>
						<view style="display: flex;margin-top: 15px;" v-if="userObj.renovate_garbage_clear != null">
							<view style="color: #999">垃圾清运费扣除</view>
							<text style="font-weight: 700;color: #F9A832;margin-left: 10px;">
								{{userObj.renovate_garbage_clear}}</text>元
						</view>
						<view style="display: flex;margin-top: 15px;" v-if="userObj.renovate_other != null">
							<view style="color: #999">其他费用扣除</view>
							<text style="font-weight: 700;color: #F9A832;margin-left: 10px;">
								{{userObj.renovate_other}}</text>元
						</view>

						<view style="margin-top: 15px;">
							<view style="color: #999">共计扣除</view>
							<text style="font-weight: 700;float: right;margin-top: -20px;">
								<span style="color: #F9A832;">
									{{userObj.renovate_out_refund}}</span>
								元</text>
						</view>

						<view style="color: #999999;margin-top: 15px;">扣除费用计入财务收入-违约金！</view>

						<view style="margin-top: 15px;">
							<view style="color: #999">应退费用</view>
							<text style="font-weight: 700;float: right;margin-top: -20px;">
								<span style="color: #F9A832;">
									{{userObj.renovate_refund_money}}</span>元
							</text>
						</view>

					</view>

				</view>

			</view>
			<view class="u-m-t-20 repair-box" style="padding: 15px 30px;">
				<view class="repair-titel u-m-b-20">
					<view>
						<h3>装修拒绝原因</h3>
					</view>
				</view>
				<view class='guar-text' style="background-color: #EEEEEEFF;border-radius: 10px;">
					<textarea maxlength='-1' v-model="check_text" type="textarea" placeholder="装修拒绝原因" />
				</view>

			</view>
		</view>
		<view style="padding: 32px 0;">
			<button type="default"
				style="width: 80%;border-radius: 78px;background: linear-gradient(180deg, #76D904 0%, #417505 100%);color: #fff;"
				@click="getagreeList">拒绝</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userObj: {},
				check_text: null,
			}
		},
		onLoad(options) {
			const item = JSON.parse(decodeURIComponent(options.item));
			this.userObj = item
			console.log(this.userObj)
		},
		methods: {
			async getagreeList() {
				let res = this.$request.api.updateRenoven({
					id: this.userObj.id,
					refuseState: 2,
					ownerApp:1,
					check_id: uni.getStorageSync('rawData').userId,
					check_text: this.check_text
				}).then(res => {
					uni.showModal({
						title: '提示',
						content: '已退款拒绝退款！',
						showCancel: false,
						success: function(res) {
							uni.reLaunch({ //跳转页面
								url: "/pages/renovation/renovationindex"
							})
						},

					});
				})
			},
		}
	}
</script>

<style lang="scss">
	.repair-wrap {
		width: 100%;
		min-height: 100vh;
		height: auto;
		background: #f4f4f4;
		overflow: hidden;

		.repair-box {
			background: #fff;

			.repair-titel {
				height: 44rpx;
				line-height: 44rpx;

				.repair-titel-l {
					float: left;
				}

				.repair-titel-r {
					float: right;
					color: #999;
				}
			}

			.repair-6 {
				color: #666;
			}
		}
	}
</style>